package com.jsu.springboot_crop.controller;

import com.jsu.springboot_crop.common.Result;
import com.jsu.springboot_crop.common.StatusCode;
import com.jsu.springboot_crop.entity.Bank;
import com.jsu.springboot_crop.service.BankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author wang
 * @Date 2023/8/26 15:50
 */
@RestController
@RequestMapping("/finance")
public class BankController {
    @Autowired
    BankService bankService;
    //查询银行情报
    @GetMapping("/selectbank")
    public Result selectAllBank(){
        List<Bank> banks = bankService.selectAllBank();
        return new Result(true, StatusCode.OK, "查询成功", banks);
    }
}
